home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
bbs
/
cuser125.zip
/
COOLUSER.MH
< prev
next >
Wrap
Text File
|
1997-07-12
|
6KB
|
250 lines
//////////////////////////////////////////////////////////////////////////////
//
// CoolUser V1.25 (C)1996-1997 Neil Staib Global Settings
//
// MEX: Copywrite 1990, 1995 by Lanius Corporation. All Rights reserved.
//
//////////////////////////////////////////////////////////////////////////////
//
// Uncomment which ones you wish let yout users have.
//
#define handle_opt
#define location_opt
#define voice_opt
#define data_opt
#define birth_opt
//#define gender_opt
#define password_opt
//#define language_opt
#define protocol_opt
#define msg_editor_opt
//#define scn_width_opt
//#define clear_opt // Must set to uncomment to create screen style.
#define quiet_opt
#define ansi_opt
//#define hidden_opt
#define msg_viewer_opt
#define scn_length_opt
#define more_opt
#define hot_opt
//#define avatar_opt
#define qwk_opt
//#define help_opt
//#define rip_opt
//////////////////////////////////////////////////////////////////////////////
// If you have external protocols commment out the below
//////////////////////////////////////////////////////////////////////////////
#define internal_not
//////////////////////////////////////////////////////////////////////////////
// Enter in Date format
//////////////////////////////////////////////////////////////////////////////
//#define USDATE
#define EUDATE
//#define JPDATE
////////////////////////////////////////////////////////////////////////////////
//
// Number of phone numbers for your area eg mine is 8 being 55477184
//
////////////////////////////////////////////////////////////////////////////////
#define phone_no 8
////////////////////////////////////////////////////////////////////////////////
//
// Minimum age callers can be.
////////////////////////////////////////////////////////////////////////////////
#define min_age 5 // Callers should old then 5 years old
////////////////////////////////////////////////////////////////////////////////
// Internal Sub Routines
////////////////////////////////////////////////////////////////////////////////
string Bool(int: i)
{
if (i <> 0)
return str_yes;
return str_no;
}
string Boolo(int: i)
{
if (i <> 1)
return str_yes;
return str_no;
}
string Boolansi(int: i)
{
if (i = 3)
return str_no;
else
{
if (i = 1)
return str_yes;
if (i = 0)
return str_no;
}
}
string Boolavatar(int: i)
{
if (i = 3)
return str_yes;
else
return str_no;
}
string HelpLevel(int: help) // Returns a instead of a value
{
if (help=HELP_NOVICE)
return str_novic;
else if (help=HELP_REGULAR)
return str_regul;
return str_exper;
}
int getdigit(ref string: instr)
{
int: p, i, l;
string: temp;
p:=0;
l:=strlen(instr);
i:=1;
while (i <= l)
{
if (instr[i] >= '0' AND instr[i] <= '9')
p:=(p*10)+(instr[i]-'0');
else l:=i;
i:=i+1;
}
instr:=substr(instr,i,strlen(instr)-i+1);
return p;
}
string UserSex(int: sex)
{
if (sex=SEX_UNKNOWN)
return str_sex_unknown;
else if (sex=SEX_MALE)
return str_sex_male;
return str_sex_female;
}
string padleft(string: s, int: len, int: ch)
{
return s + strpad("", len - strlen(s), ch);
}
int checkfile(string: filename)
{
if(fileexists(str_st_dir_txt + filename) = FALSE)
{
return 1;
}
return 0;
}
void writefile(string: filename)
{
int:fd;
fd:=open(str_st_dir_txt + filename, IOPEN_CREATE | IOPEN_WRITE);
writeln(fd, " ");
close(fd);
}
string formatdob(string: dob)
{
string: year, month,day;
year := substr(dob, 1, 4);
month := substr(dob, 6, 2);
day:= substr(dob, 9, 2);
#ifdef EUDATE // Use DD-MM-YY
return (day + "-" + month + "-" + year);
#endif
#ifdef USDATE // Use MM-DD-YY
return (month + "-" + day + "-" + year);
#endif
#ifdef JPDATE // Use YY-MM-DD
return (year + "-" + month + "-" + day);
#endif
}
void pageheader()
{
print(AVATAR_CLS," ", str_st_title, "CoolUser v", str_st_version, str_st_ver, str_st_title, " Copyright ", str_st_version, "1996-97", str_st_title, " Neil Staib\n", COL_GRAY);
print( " ", str_st_title_line , padleft("", 43, '─'), "\n\n", COL_GRAY);
}
void optionbad() // Display if option is turn off
{
print(str_st_opt_disable, "\n" , str_st_menu_bad, COL_GRAY);
sleep(100);
}
void editoption(char: h1, char: v1, char:h2, char:v2, string: msg, int: no, char: block, string: cols)
{
print(AVATAR_GOTO, (char)h1, (char)v1);
print(cols, padleft(msg, no, block));
print(AVATAR_GOTO, (char)h2, (char)v2);
}
string inputuser(int: no)
{
string: name;
int: nameco;
char: inkey;
name:= "";
nameco:=1;
inkey:=getch();
while(inkey<>13) // do this until we get <Enter>
{
if(inkey=8) // if we got a <Backspace>
{
if(nameco>1)
{
print("\bâ–‘\b");
nameco:=nameco-1;
name:=substr(name,1,strlen(name)-1);
}
else
name:="";
}
else if(nameco>no) // limit to two digit numbers
{
name:="";
}
else
{
print(inkey);
name[nameco]:=inkey;
nameco:=nameco+1;
}
inkey:=getch();
}
return name;
}